import 'package:flutter/material.dart';

class LoginCode extends StatefulWidget {
  const LoginCode({Key? key}) : super(key: key);

  @override
  State<LoginCode> createState() => _LoginCodeState();
}

class _LoginCodeState extends State<LoginCode> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('验证码',style: TextStyle(fontSize: 12),),
          leading: IconButton(onPressed: () {
            //页面返回
            Navigator.pop(context);
          },
            icon: Icon(Icons.keyboard_arrow_left_rounded),

          )
      ),
      body: Container(
        child: Column(
          children: [
            Container(
              height: 70,
              margin: EdgeInsets.only(
                  right: 30,
                  left: 30,
                  top: 10
              ),
              child: TextField(
                maxLength: 6,
                // controller: _phone,
                keyboardType: TextInputType.phone,
                decoration: InputDecoration(
                    hintText: '验证码',
                    fillColor: Colors.black12,
                    filled: true,
                    suffix: InkWell(
                      onTap: (){
                        //获取验证码
                      },
                      child: Container(child: Text('获取验证码')),
                    ),
                    enabledBorder: OutlineInputBorder(
                      borderSide: BorderSide(color: Colors.white),
                      borderRadius: BorderRadius.all(Radius.circular(8)),
                    ),
                    focusedBorder: OutlineInputBorder(
                      borderSide: BorderSide(color: Colors.white),
                      borderRadius: BorderRadius.all(Radius.circular(8)),
                    )
                ),

              ),
            ),

          ],
        ),
      ),
    );
  }
}
